.number-box.pivot {
    background-color: #805ad5;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(128, 90, 213, 0.5);
}

.number-box.left-partition {
    border-left: 3px solid #805ad5;
}

.number-box.right-partition {
    border-right: 3px solid #805ad5;
}

.number-box.comparing {
    background-color: #f99737;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(249, 151, 55, 0.5);
}

.number-box.sorted {
    background-color: #48bb78;
    transition: background-color 0.3s ease;
}

/* 修改动画相关样式 */
.number-box.swap-right {
    animation: swapRight 1s ease;
}

.number-box.swap-left {
    animation: swapLeft 1s ease;
}

@keyframes swapRight {
    0% { transform: translateX(0); }
    25% { transform: translateX(20px) translateY(-20px); }
    75% { transform: translateX(70px) translateY(-20px); }
    100% { transform: translateX(70px); }
}

@keyframes swapLeft {
    0% { transform: translateX(0); }
    25% { transform: translateX(-20px) translateY(20px); }
    75% { transform: translateX(-70px) translateY(20px); }
    100% { transform: translateX(-70px); }
}

/* 删除之前的 moveUp 动画 */ 